<template>
  <div>
    <a-button type="primary" @click="openModal">打开弹窗</a-button>
    <myModal v-if="showModal" @close="closeModal" />
  </div>
</template>

<script setup lang="ts">
  import useModal from '@/common/hooks/modal';
  import { defineAsyncComponent } from 'vue';

  const myModal = defineAsyncComponent(
    () => import('@/common/views/baseComponent/modal.vue')
  );

  const { showModal, closeModal, openModal } = useModal();
</script>
